package com.lsl.learn.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * Feign 集成了Ribbon
 * 利用Ribbon维护了MicroServiceCloud-Dept的服务列表信息，并且通过轮询实现了客户端的负载均衡，而与Ribbon
 * 不同的是，通过feign只需要定义服务绑定接口且以声明式的方法，优雅而简单的实现了服务调用
 *
 * @ClassName DeptConsumer80_App
 * @Description TODO
 * @Author LSL
 * @Date 2019/8/17 13:53
 * @Version 1.0
 * @Email lsl.yx@foxmail.com
 **/
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients(basePackages = "com.lsl.learn.springcloud")
@ComponentScan(basePackages = "com.lsl.learn.springcloud")
public class DeptConsumer80_Feign_App {

    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer80_Feign_App.class, args);
    }
}
